﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Presentation/master.Master" AutoEventWireup="true" CodeBehind="StationeryRetrievalForm.aspx.cs" Inherits="Staionery_Inventory.Presentation.StationeryRetrieval.StationeryRetrievalForm" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<div class="row">
<asp:Label ID="lblSrfIdText" runat="server" Text="Form No. :" CssClass="col-sm-3 text-info"/>
<asp:Label ID="lblSrfIdValue" runat="server" CssClass="col-sm-9 text-left"></asp:Label>
</div>
<div class="row" onkeypress="return keypress(event)">
<asp:GridView runat="server"  ID="gvSrfList" 
        CssClass="col-sm-12 table table-striped table-bordered table-hover"
        AutoGenerateColumns="False" ondatabound="gvSrfList_DataBound">
    <Columns>
    <asp:BoundField DataField="ItemDescription" HeaderText="Item" />
    <asp:BoundField DataField="StockAvailable" HeaderText="Stock Qty" />
    <asp:BoundField DataField="DepartmentName" HeaderText="Department" />
    <asp:BoundField DataField="NeededQty" HeaderText="Needed Qty" />
        <asp:TemplateField>
        <HeaderTemplate>Actual Qty</HeaderTemplate>
        <ItemTemplate>
        <asp:TextBox ID="actualQty" CssClass="form-control" runat="server" 
                Text='<%#Eval("ActualQty") %>' required ontextchanged="actualQty_TextChanged" />
        <asp:RangeValidator ControlToValidate="actualQty" runat="server" ID="rvQty" MaximumValue='<%#Eval("NeededQty") %>' MinimumValue="0" ErrorMessage="Range over" Type="Integer"/>
        </ItemTemplate>
        </asp:TemplateField>
    </Columns>
</asp:GridView>
</div>
<br/>
<div class="row">
<div class="col-md-3">
<asp:Label ID="lblFeedback" runat="server" Text="Feedback Message"></asp:Label>
</div>
<div class="col-md-8 col-md-offset-1">
<div class = "col-md-4">
<asp:Button ID="btnGenerateSRF" runat="server" Text="Generate SRF" 
        CssClass="btn btn-info" onclick="btnGenerateSRF_Click"/>
</div>
<div class = "col-md-4 col-md-offset-1">
<asp:Button ID="btnDisburseSRF" runat="server" Text="Disbursement List" 
        CssClass="btn btn-success" onclick="btnDisburseSRF_Click"/>
</div>
</div>
</div>
</asp:Content>
